var mongoose=require('mongoose')
var Schema=mongoose.Schema
//studentsInfo名字和Student表的名字不能重复
mongoose.connect('mongodb://localhost/studentsInfo')
var studentSchema=new Schema({
    name:{type:String,required:true},
    gender:{type:Number,enum:[0,1],default:0},
    age:{type:Number,required:true},
    hobbies:{type:String}
})
module.exports=mongoose.model('Student',studentSchema)

